package az.mecid.rssreader.client.services.utils;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Created by IntelliJ IDEA.
 * User: mega
 * Date: 26.02.2010
 * Time: 2:59:23
 */
public abstract class Callback<T> implements AsyncCallback<T>{

    public void onFailure(Throwable caught) {
        Window.alert("Ooops..Error..Try Again..");
    }

    public void onSuccess(T result) {
       done(result);
    }

    public abstract void done(T result);
}
